package com.example.interviewrecorder.manager

import com.example.interviewrecorder.utils.LyyLogUtil

object LyyExceptionManager:Thread.UncaughtExceptionHandler {
    private const val TAG = "LyyExceptionManager"

    fun init(){
        Thread.setDefaultUncaughtExceptionHandler(this)
    }

    override fun uncaughtException(t: Thread, e: Throwable) {
        LyyLogUtil.e(TAG,"${t.name}线程中，您有未捕获的异常: ${e}")
        e.printStackTrace()
    }
}